package constant

type EnvType string

// 运行环境 按需增加
const (
	EnvDev  EnvType = "dev"
	EnvDemo EnvType = "demo"
	EnvProd EnvType = "prod"
)

type NodeType string

// 节点类型
const (
	ApiNd        NodeType = "api"
	CatNd        NodeType = "cat"
	UcNd         NodeType = "uc"
	G8Nd         NodeType = "g8"
	AviatorNd    NodeType = "aviator"
	AvTowerNd    NodeType = "avtower"
	BetTowerNd   NodeType = "betower"
	RouBigNd     NodeType = "roubig"
	RouTowerNd   NodeType = "routower"
	AdminNd      NodeType = "admin"
	ScratchOffNd NodeType = "scratchoff"
)

const (
	EmptyStr   = ""
	ZeroStr    = "0"
	ZeroDot    = "0."
	ZeroF      = "0.0"
	UnderScore = "_"
	Hyphen     = "-"
	Colon      = ":"
	Dot        = "."
	Comma      = ","
	OkStr      = "OK"
	AllStr     = "all"
)

type Status int8

const (
	Down     Status = 0
	Up       Status = 1
	Maintain Status = 2
)

type LoadBalance int8

const (
	Random      LoadBalance = 0
	RoundRobin  LoadBalance = 1
	Consistent  LoadBalance = 2
	WeightRobin LoadBalance = 3
	UserCustom  LoadBalance = 4
)

type FailMode int8

const (
	FailFast FailMode = 0
	FailOver FailMode = 1
	FailTry  FailMode = 2
)

type Protocol int8

const (
	HTTP  Protocol = 0
	HTTPS Protocol = 1
	RPCx  Protocol = 2
	WS    Protocol = 3
)

type SerializeType int8

const (
	SerializeNone SerializeType = 0
	ProtoBuffer   SerializeType = 1
	JSON          SerializeType = 2
	MsgPack       SerializeType = 3
	Thrift        SerializeType = 4
)

const (
	JsonContentType = "application/json; charset=utf-8"
)

const (
	MinStmPerSize int32 = 10
	MaxStmPerSize int32 = 300
)

const (
	ThreeMonthsInSecs int64 = 60 * 60 * 24 * 30 * 3
)
